package com.changgou.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @author ：周
 * @ClassName: CommentFeign
 * @date ：2019/8/15  18:14
 * @description ：
 * @version: 1.0
 */
@FeignClient("comment")
public interface CommentFeign {

    /**
     * 添加评论信息
     * @param map
     * @return
     */
    @PostMapping("/comment/add")
    public Result add(@RequestBody Map<String ,String> map);
    /**
     * 根据spuId查询评价列表
     * @param spuId
     * @return
     */
    @GetMapping("/comment/{spuId}")
    public Result query(@PathVariable("id") String spuId);
}
